﻿#include <iostream>

using namespace std;

bool perfect(int m);

int main()
{
	int m;
	cin >> m;
	cout << (perfect(m) ? "True" : "False");
	return 0;
}

bool perfect(int m)
{
	int n = 1;
	int sum = 0;
	while (m > n) {
		while (m % n)
		{
			n++;
		}
		sum += n;
		n++;
	}
	return sum == m * 2;
}
